<*****页面*****>
<template>
	<div class="reportPage">
		<div class="reportPageWrap">
			<header class="pageHeader">
				<h1 class="title">{{title}}</h1>
				<div class="line"></div>
			</header>
			<main class="pageContent" :class="type == 'table' ? 'border' : ''">
			    <slot></slot>
			</main>
			<page-footer v-if="showFooter != '1'" :configAddress="configAddress" :configInstruction="configInstruction"></page-footer>
		</div>
		<img src="../../assets/exam/bg.jpg" alt="" class="pageBg" />
	</div>
</template>

<script>
	import baseURL from '@/api/index'
	import { getLogoImg } from '@/api/login.js'
	import pageFooter from '@/components/report/pageFooter.vue'
	export default {
		name: 'page',
		components:{pageFooter},
		props:['configAddress','configInstruction','title','type','showFooter'],
		data() {
			return {
				sysLogo:'',
				showSysLogo:true
			}
		},
		watch: {

		},
		filters: {

		},
		computed: {

		},
		mounted() {
			// this.sysLogo = `${baseURL}/sdn/sys/menu/sysImage?sysType=2&label=1`
			this.getLogo()
		},
		beforeDestroy() {

		},
		methods: {
			hideSysLogo() {
				this.showSysLogo = false;
			},
			// 获取系统浏览器标签的图标
            getLogo(){
                let params = {
                    systemType:'designer'
                }
                getLogoImg(params)
                .then(res=>{
                    if(res.data.code === 1){
                        this.sysLogo = 'data:image/png;base64,'+res.data.data[0].logo
                    }
                })
                .catch(err=>{
                    console.log(err)
                })
            },
		},
		destroyed() {

		}
	}
</script>

<style scoped>
	.reportPage {
		position: relative;
		box-shadow: 0 0 5px #ccc;
		width: 42.5em;
		height: 60.143em;
		margin: 1.85em 0;
		padding: 2em;
	}
	.reportPageWrap {
		margin: 0 !important;
		position: absolute;
		left: 1.85em;
		right: 1.85em;
		top: 1.85em;
		bottom: 1.85em;
		z-index: 2;
		display: flex;
		flex-direction: column;
	}
	.pageBg {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: 100%;
	}
	.pageHeader {
		text-align: center;
	}
	.line{
		height:7px;
		border-top:1px solid #696969;
		border-bottom:2px solid #696969;
		margin:10px 0;
	}
	.title{
		font-size:2em;
		color:#333;
	}
	.pageContent {
		overflow: hidden;
		flex: 1 1 auto;
	}
	.pageContent.border{
		padding: 1em;
		border: 1px solid #b3b3b3;
	}
</style>